package com.liufeng.test.spring.pojo;


import lombok.Data;

import java.io.Serializable;

@Data
public class ResultBean<T> implements Serializable {
    public static final int SUCCESS=0;
    public static final int FAIL=1;
    public static final int NO_PERMISSION=2;
    private String msg = "SUCCESS";
    private int code = SUCCESS;
    private T data;

    public ResultBean() {
        super();
    }

    public ResultBean(T data) {
        super();
        this.data = data;
    }
    public ResultBean(Throwable e) {
        super();
        this.msg = e.toString();
        this.code = FAIL;
    }
}

